package sg4c.frontend.command;

import java.io.IOException;
import sg4c.frontend.GraphicsContext;
import sg4c.protocol.DataInputProtocol;

public class SetStrokeWeight implements GraphicsCommand {

    
    private final float weight;

    public SetStrokeWeight(float weight) {
        this.weight = weight;
    }

    public void execute(GraphicsContext context) {
        context.setStrokeWeight(weight);
    }
    public static final GraphicsCommand.Factory factory = new GraphicsCommand.Factory() {

        public GraphicsCommand parse(DataInputProtocol in) throws IOException {
            return new SetStrokeWeight(in.readFloat());
        }
    };
}
